package com.nali.spreader.data;

import com.nali.common.model.BaseModel;
import java.io.Serializable;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RobotRegister extends BaseModel implements Serializable {

    public static final Integer ID_TYPE_PERSON = 0;

    public static final Integer ID_TYPE_STUDENT = 1;

    public static final Integer ID_TYPE_ARMY = 2;

    public static final Integer ID_TYPE_PASSPORT = 3;

    private static final long serialVersionUID = -3989939467145122115L;

    private static final Pattern upperPattern = Pattern.compile("[A-Z]");

    public int getBirthdayFull() {
        return birthdayYear * 10000 + birthdayMonth * 100 + birthdayDay;
    }

    public String getFullName() {
        return firstName + lastName;
    }

    public String getFullNamePinyin() {
        return firstNamePinyin + lastNamePinyin;
    }

    public String getFullNamePinyinLower() {
        return (firstNamePinyin + lastNamePinyin).toLowerCase();
    }

    public String getFirstNamePinyinLower() {
        return firstNamePinyin.toLowerCase();
    }

    public String getLastNamePinyinLower() {
        return lastNamePinyin.toLowerCase();
    }

    public String getEnNameLower() {
        return lowerCaseFirst(enName);
    }

    public String getShortPinyinLower() {
        return getShortPinyinUpper().toLowerCase();
    }

    public String getShortPinyinUpper() {
        String fullNamePinyin = getFullNamePinyin();
        StringBuilder sb = new StringBuilder();
        Matcher matcher = upperPattern.matcher(fullNamePinyin);
        while (matcher.find()) {
            sb.append(fullNamePinyin.charAt(matcher.start()));
        }
        return sb.toString();
    }

    private static String lowerCaseFirst(String str) {
        if (str == null || "".equals(str)) {
            return str;
        }
        return Character.toLowerCase(str.charAt(0)) + str.substring(1);
    }

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private Long id;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.first_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String firstName;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.last_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String lastName;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.gender
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private Integer gender;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.first_name_pinyin
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String firstNamePinyin;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.last_name_pinyin
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String lastNamePinyin;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.en_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String enName;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.nick_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String nickName;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.province
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String province;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.city
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String city;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.birthday_year
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private Integer birthdayYear;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.birthday_month
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private Integer birthdayMonth;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.birthday_day
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private Integer birthdayDay;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.constellation
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private Integer constellation;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.school
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String school;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.career
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String career;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.pwd
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String pwd;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.email
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String email;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.introduction
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String introduction;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.update_time
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private Date updateTime;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.county
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String county;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.person_id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String personId;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.student_id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private String studentId;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column spreader.tb_robot_register.real_man_id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    private Long realManId;

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.id
     *
     * @return the value of spreader.tb_robot_register.id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public Long getId() {
        return id;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.id
     *
     * @param id the value for spreader.tb_robot_register.id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.first_name
     *
     * @return the value of spreader.tb_robot_register.first_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.first_name
     *
     * @param firstName the value for spreader.tb_robot_register.first_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.last_name
     *
     * @return the value of spreader.tb_robot_register.last_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.last_name
     *
     * @param lastName the value for spreader.tb_robot_register.last_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.gender
     *
     * @return the value of spreader.tb_robot_register.gender
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public Integer getGender() {
        return gender;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.gender
     *
     * @param gender the value for spreader.tb_robot_register.gender
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setGender(Integer gender) {
        this.gender = gender;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.first_name_pinyin
     *
     * @return the value of spreader.tb_robot_register.first_name_pinyin
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getFirstNamePinyin() {
        return firstNamePinyin;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.first_name_pinyin
     *
     * @param firstNamePinyin the value for spreader.tb_robot_register.first_name_pinyin
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setFirstNamePinyin(String firstNamePinyin) {
        this.firstNamePinyin = firstNamePinyin;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.last_name_pinyin
     *
     * @return the value of spreader.tb_robot_register.last_name_pinyin
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getLastNamePinyin() {
        return lastNamePinyin;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.last_name_pinyin
     *
     * @param lastNamePinyin the value for spreader.tb_robot_register.last_name_pinyin
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setLastNamePinyin(String lastNamePinyin) {
        this.lastNamePinyin = lastNamePinyin;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.en_name
     *
     * @return the value of spreader.tb_robot_register.en_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getEnName() {
        return enName;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.en_name
     *
     * @param enName the value for spreader.tb_robot_register.en_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setEnName(String enName) {
        this.enName = enName;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.nick_name
     *
     * @return the value of spreader.tb_robot_register.nick_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getNickName() {
        return nickName;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.nick_name
     *
     * @param nickName the value for spreader.tb_robot_register.nick_name
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.province
     *
     * @return the value of spreader.tb_robot_register.province
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getProvince() {
        return province;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.province
     *
     * @param province the value for spreader.tb_robot_register.province
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setProvince(String province) {
        this.province = province;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.city
     *
     * @return the value of spreader.tb_robot_register.city
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getCity() {
        return city;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.city
     *
     * @param city the value for spreader.tb_robot_register.city
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setCity(String city) {
        this.city = city;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.birthday_year
     *
     * @return the value of spreader.tb_robot_register.birthday_year
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public Integer getBirthdayYear() {
        return birthdayYear;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.birthday_year
     *
     * @param birthdayYear the value for spreader.tb_robot_register.birthday_year
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setBirthdayYear(Integer birthdayYear) {
        this.birthdayYear = birthdayYear;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.birthday_month
     *
     * @return the value of spreader.tb_robot_register.birthday_month
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public Integer getBirthdayMonth() {
        return birthdayMonth;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.birthday_month
     *
     * @param birthdayMonth the value for spreader.tb_robot_register.birthday_month
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setBirthdayMonth(Integer birthdayMonth) {
        this.birthdayMonth = birthdayMonth;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.birthday_day
     *
     * @return the value of spreader.tb_robot_register.birthday_day
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public Integer getBirthdayDay() {
        return birthdayDay;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.birthday_day
     *
     * @param birthdayDay the value for spreader.tb_robot_register.birthday_day
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setBirthdayDay(Integer birthdayDay) {
        this.birthdayDay = birthdayDay;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.constellation
     *
     * @return the value of spreader.tb_robot_register.constellation
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public Integer getConstellation() {
        return constellation;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.constellation
     *
     * @param constellation the value for spreader.tb_robot_register.constellation
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setConstellation(Integer constellation) {
        this.constellation = constellation;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.school
     *
     * @return the value of spreader.tb_robot_register.school
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getSchool() {
        return school;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.school
     *
     * @param school the value for spreader.tb_robot_register.school
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setSchool(String school) {
        this.school = school;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.career
     *
     * @return the value of spreader.tb_robot_register.career
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getCareer() {
        return career;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.career
     *
     * @param career the value for spreader.tb_robot_register.career
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setCareer(String career) {
        this.career = career;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.pwd
     *
     * @return the value of spreader.tb_robot_register.pwd
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getPwd() {
        return pwd;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.pwd
     *
     * @param pwd the value for spreader.tb_robot_register.pwd
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.email
     *
     * @return the value of spreader.tb_robot_register.email
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getEmail() {
        return email;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.email
     *
     * @param email the value for spreader.tb_robot_register.email
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.introduction
     *
     * @return the value of spreader.tb_robot_register.introduction
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getIntroduction() {
        return introduction;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.introduction
     *
     * @param introduction the value for spreader.tb_robot_register.introduction
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.update_time
     *
     * @return the value of spreader.tb_robot_register.update_time
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.update_time
     *
     * @param updateTime the value for spreader.tb_robot_register.update_time
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.county
     *
     * @return the value of spreader.tb_robot_register.county
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getCounty() {
        return county;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.county
     *
     * @param county the value for spreader.tb_robot_register.county
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setCounty(String county) {
        this.county = county;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.person_id
     *
     * @return the value of spreader.tb_robot_register.person_id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getPersonId() {
        return personId;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.person_id
     *
     * @param personId the value for spreader.tb_robot_register.person_id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setPersonId(String personId) {
        this.personId = personId;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.student_id
     *
     * @return the value of spreader.tb_robot_register.student_id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public String getStudentId() {
        return studentId;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.student_id
     *
     * @param studentId the value for spreader.tb_robot_register.student_id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column spreader.tb_robot_register.real_man_id
     *
     * @return the value of spreader.tb_robot_register.real_man_id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public Long getRealManId() {
        return realManId;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column spreader.tb_robot_register.real_man_id
     *
     * @param realManId the value for spreader.tb_robot_register.real_man_id
     *
     * @ibatorgenerated Thu Aug 16 11:34:47 CST 2012
     */
    public void setRealManId(Long realManId) {
        this.realManId = realManId;
    }
}
